var conn=require('connect');
var bodyParser=require('body-parser');
var cookieParser=require('cookie-parser');
var app=conn();

app.use(bodyParser());
app.use(cookieParser());

app.use(function (req, res,next) {
    res.write('\n\nurl:'+req.url);
    next();
});

app.use(function (req, res,next) {
    res.write('\n\nbody:'+JSON.stringify(req.body,null,2));
    next();
});

app.use(function (req, res,next) {
    res.write('\n\ncookie:'+JSON.stringify(req.cookies,null,2));
    next();
});

app.use(function (req,res) {
    res.end('\nEnd.');
});

app.listen(3000,function () {
    console.log('Query 3000');
});